//
//  BaseTableViewController.swift
//  SinaWeibo
//
//  Created by rms on 15/10/6.
//  Copyright © 2015年 rms. All rights reserved.
//

import UIKit

class BaseTableViewController: UITableViewController ,visitorLoginViewDelegate{

    var victorLoginView : VictorLoginView?
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Uncomment the following line to preserve selection between presentations
        // self.clearsSelectionOnViewWillAppear = false

        // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
        // self.navigationItem.rightBarButtonItem = self.editButtonItem()
        
        self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", style: UIBarButtonItemStyle.Plain, target: self, action: "visitorWillRegister")
        self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登录", style: UIBarButtonItemStyle.Plain, target: self, action: "visitorWillLogin")
    }

    
    func visitorWillRegister(){
    
        print(__FUNCTION__)
    
    }
    
    func visitorWillLogin(){
    
        print(__FUNCTION__)
    
    }
    override func loadView() {
        victorLoginView = NSBundle.mainBundle().loadNibNamed("VictorLoginView", owner: nil, options: nil).last as?VictorLoginView
        victorLoginView?.visitorDelegate = self
        view = victorLoginView
    }

}
